<?php
namespace App\Http\ViewComposers;

use App\Events\SystemNotify;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use App\Models\Group;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Request;
use App\Models\User;
use App\Models\Register;
use App\Models\RegUser;
use App\Models\Company;


//获取皮肤id
class SkinComposer
{
    private $user;
    private $skinid;
    

    public function __construct()
    {
        $this->skinid = 1;
        if(!empty(Auth::user()) && !empty(Auth::user()->comuser())){
            $this->skinid = Auth::user()->comuser()->skinid;
        }

    }
    
    

    public function compose(View $view)
    {
        $view->with('skinid',$this->skinid);
    }
}